package com.cloudlinkin.util.google.guava;

import com.google.common.cache.Cache;
import com.google.common.cache.CacheBuilder;

import java.util.concurrent.TimeUnit;

/***
 * 谷歌guava库的学习使用
 */
public class xfgb {

    public static void main(String[] args) {



        kk();
    }
    public static void kk() {
        Cache<Object, Object> build = CacheBuilder.newBuilder().maximumSize(1).expireAfterAccess(1, TimeUnit.MINUTES).build();
       build.put("1","1");
        build.put("2","1");
        System.out.print(build.getIfPresent("2"));


    }

}
